Accusoft.ImagXpress13.ActiveX
Print an Image

ImagXpress® enables you to print an image, using either ImagXpress or PrintPRO™.

Print the Image using ImagXpress

ImagXpress enables the user to print an image. This can be the easiest way to print the image, if the DC and printed page coordinates are known. ImagXpress provides an easy way to print. 

Use the PrintImage method to print an image:

  1. If your printer requires printer banding, ensure PrinterBanding property is set to True.
  2. Set the ProcessImageID and ViewImageID properties to the image you wish to print.
  3. Call the PrintImage method to print the image in position and size specified. The type of print can be set as well as the units of measure for the position and size.

The following code prints the current ImagXpress image in the upper left corner of the printed page.

VB Example
Copy Code
ImagXpress1.FileName = "C:\IMAGES\BIRD.JPG"
Printer.Print ""
 ' Assumes twips so use ImagWidth and ImagHeight
ImagXpress1.PrintImage Printer.hDC, 0, 0, ImagXpress1.ImagWidth, ImagXpress1.ImagHeight, IX_GraphicsUnit_Twip, IX_PrintType_FullImage
Printer.EndDoc 

Print the Image using PrintPRO

The ImagXpress PrintImage method requires a printer DC from the container. However, in some containers, a printer DC is not available. In this case, PrintPRO provides a vehicle to print to a selected printing device. PrintPRO also may provide the best solution if you require a customized printer interface and programmatic control over printing functions. 

VB Example
Copy Code
// This code demonstrates how to print an image using ImagXpress and PrintPRO
Dim a As Integer
Dim b As Integer
PrintPRO1.hDIB = Xpress1.hDIB
PrintPRO1.ScaleMode = SCALE_Pixel
PrintPRO1.StartPrintDoc
a = PrintPRO1.ScaleWidth - PrintPRO1.LMargin
b = PrintPRO1.ScaleHeight - PrintPRO1.TMargin - PrintPRO1.BMargin
PrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, True
PrintPRO1.EndPrintDoc

 

VB Example
Copy Code
// This code demonstrates how to print a multi-page TIFF image using ImagXpress and PrintPRO
PrintPRO1.PrintDialog
PrintPRO1.StartPrintDoc
For counter = 1 To IX1.NumPages(IX1.FileName)
    IX1.PageNbr = counter
    IX1.FileName = IX1.FileName
    PrintPRO1.hDIB = IX1.hDIB
    a = PrintPRO1.ScaleWidth - 1 - PrintPRO1.LMargin
    b = PrintPRO1.ScaleHeight - 1 - PrintPRO1.Tmargin - PrintPRO1.BMargin
    PrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, True
    PrintPRO1.NewPage
Next counter
PrintPRO1.EndPrintDoc

Color Management While Printing an Image

Color management is performed to ensure that the image has a similar appearance, regardless of the device on which it is displayed or printed. When printing an image, the image must be converted to the device-specific color space of the specified printer. This conversion can be done at a number of different points in the process:

To perform color management with ImagXpress:

  1. Ensure that ICMEnabled property is set to True.
  2. Specify how profiles should be applied, by setting the ICMRenderIntent property (for example, Picture, Graphics, Business and Colorimetric interpretation).
  3. Enable color management of an image to be proofed, by setting ICMProofingEnabled property to True. Set the ICMTargetProfileName property to the profile to use when proofing the image. When ICMProofingEnabled is True, this profile overrides the ICMPrinterProfileName property. This can be helpful if proofing occurs on a printer/ink different than the destination printer.
  4. Specify the color profile to use when performing ICM on an image to be printed (ICMPrinterProfileName). Setting ICMPrinterProfileName doesn't change the profile name stored with the printer device context - it simply specifies the color profile ImagXpress should use in performing Image Color Management.
  5. Send the image to the specified device, or to PrintPRO, to be printed (see above).  
See Also

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback